import { GCellRenderer } from "../../../../com/mui/controls/GCellRenderer";
import { FilterConst } from "../../../component/gconst/FilterConst";
import { GlobalStyle } from "../../../common/global/GlobalStyle";
import { ColorConfig } from "../../resource/ColorConfig";
import { Language } from "../../../../extend/language/Language";
//class TreasureProfileRenderer
    
    export  class TreasureProfileRenderer extends GCellRenderer
    {
        constructor()
        {
            super();
            return;
        }

        protected /* override */ configUI(): void
        {
            super.configUI();
            if (this._txt != null) 
            {
                if (this._txt.parent) 
                {
                    removeChild(this._txt);
                }
            }
            this._txt = new Object /* flash.text.TextField */();
            this._txt.width = 180;
            this._txt.height = 20;
            this._txt.x = 5;
            this._txt.y = 0;
            this._txt.text = "000";
            this._txt.selectable = false;
            this._txt.filters = [FilterConst.glowFilter];
            this._txt.defaultTextFormat = GlobalStyle.textFormat2;
            addChild(this._txt);
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            super.data = arg1;
            var loc1=arg1.itemData;
            var loc2=arg1.updateAmount;
            var loc3=ColorConfig.instance.getItemColor(loc1.itemInfo.item.color).color;
            this._txt.htmlText = Language.getString(35030) + "<font color=\'" + loc3 + "\'>【" + loc1.itemInfo.item.name + "】 * " + loc2 + "</font>";
            return;
        }

        /* internal */ /* var */_txt: Object /* flash.text.TextField */;
    }
